package com.ls.cloud.business.common;

import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.id.IdentityGenerator;

import java.io.Serializable;
import java.util.UUID;

/**
 * @author: candy33
 * @Date: 2022/05/11 23:55
 * com.ls.cloud.common.utils
 */
public class GeneratedUUID extends IdentityGenerator {

    @Override
    public Serializable generate(SharedSessionContractImplementor session, Object object) {
        return UUID.randomUUID().toString();
    }

}
